/*
 * @Description:
 * @Author: Haor
 * @Date: 2022-03-31 20:37:58
 * @LastEditTime: 2022-05-06 17:24:23
 * @LastEditors: Haor
 */
import { Module } from '@nestjs/common'
import { JwtModule } from '@nestjs/jwt'
import { UserModule } from '../user/user.module'
import { AuthService } from './auth.service'
import { AuthController } from './auth.controller'
import { PassportModule } from '@nestjs/passport'
import { LocalStrategy } from './local.strategy'
import { JwtStrategy } from "./jwt.strategy";
import { jwtConstants } from '@constants/jwt.constant'
@Module({
	imports: [
		UserModule,
        PassportModule.register({ defaultStrategy: 'jwt' }),
		JwtModule.register({
			secret: jwtConstants.secret,
			signOptions: { expiresIn: '12h' }
		})
	],
	controllers: [AuthController],
	providers: [AuthService, LocalStrategy, JwtStrategy]
})
export class AuthModule {}
